package svc

import (
	"shell/api/internal/config"
	"shell/shellrpc/shellrpcclient"

	"github.com/zeromicro/go-zero/zrpc"
)

type ServiceContext struct {
	Config   config.Config
	ShellRpc shellrpcclient.Shellrpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:   c,
		ShellRpc: shellrpcclient.NewShellrpc(zrpc.MustNewClient(c.ShellRpc)),
	}
}
